﻿@if (ViewBag.IsLogOn)
{
    <text>
        @ViewBag.UserID
        @ViewBag.IP
        @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) {
            @Html.AntiForgeryToken()
            <a href="javascript:document.getElementById('logoutForm').submit()">登陆</a>
        }
    </text>
} else {
    <ul> 
        <li>@Html.ActionLink("登陆", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
